// 使用Promise进行改进
var wake = (time, msg) => {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            resolve(msg)
        })
    },time)
}
var a = wake(10, 'hello')
var b = wake(10, 'lagou')
var c = wake(10, 'I ❤️ U')

Promise.all([a,b,c]).then((res) => {
    console.log(res.join(' '))
}).catch((error) => {
    console.log(error)
})
